<template>
  <yj-mob-image show-loading :src="src" :width="width" :height="height" class="loading-image">
    <template v-slot:loading>
      <yj-mob-loading type="spinner" :size="loadingSize" />
    </template>
  </yj-mob-image>
</template>

<script>
import { Image, Loading } from 'yj-mob-ui';
export default {
  components: {
    [Image.name]: Image,
    [Loading.name]: Loading
  },
  props: {
    src: {
      type: String
    },
    width: {
      type: [String, Number]
    },
    height: {
      type: [String, Number]
    },
    round: {
      type: Boolean,
      default: false
    },
    loadingSize: { // 加载loading 默认大小
      type: Number,
      default: 10
    }
  },
  data: () => ({
    loading: false
  }),
  methods: {
  }
};
</script>

<style lang="scss">
.loading-image {
  .van-image__loading{
    background-color: #fff;
  }
}
</style>
